package com.gohi.main.interceptor;


import java.util.Map;

import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.AbstractInterceptor;

/**
 * 判断用户是否已经在微信里面授权了
 * */
public class WxUserInterceptor extends AbstractInterceptor {

	@Override
	public String intercept(ActionInvocation invocation) throws Exception {
		// 获取请求的action名称
//		String actionName = invocation.getInvocationContext().getName();
		//是否登录
		Map map = invocation.getInvocationContext().getSession();
		if(null == map.get("openid")){
		//System.err.println("没有存在哦啊啊啊啊啊啊啊啊啊啊啊啊");
		return "WxoAuth";
		}
		return invocation.invoke();
	}
	

}
